package com.example.tys.daggermvp.dagger2.module;

import com.example.tys.daggermvp.dagger2.annotation.ActivityScoped;
import com.example.tys.daggermvp.mvp.contract.MainActivityContract;
import com.example.tys.daggermvp.mvp.module.MainActivityData;
import com.example.tys.daggermvp.mvp.presenter.MainActivityPresenter;
import com.example.tys.daggermvp.mvp.view.MainActivity;

import dagger.Module;
import dagger.Provides;

/**
 * Activity 对应的Module。在ActivityBindingModule中设置对应关系
 *
 * @author tys
 * @date 2018/4/14
 */
@Module
public abstract class MainActivityModule {

    @ActivityScoped
    @Provides
    static MainActivityContract.Presenter providePresenter(MainActivity mainActivity) {
        return new MainActivityPresenter();
    }

    @ActivityScoped
    @Provides
    static MainActivityContract.Date provideDataModule(MainActivity mainActivity) {
        return new MainActivityData();
    }


}
